package com.bocai.nettyclient.controller;

import com.bocai.nettycommons.entity.User;
import com.bocai.nettycommons.rpc.service.DemoService;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.constraints.NotNull;

/**
 * @author ：minyang
 * @date ：Created in 2019/10/23 19:39
 */
@RequestMapping("/test")
@RestController
public class TestController {

    @Resource
    private DemoService demoService;

    @GetMapping("/test")
    @ResponseBody
    public String test() {
        return "hhh";
    }

    @GetMapping("/getUser")
    @ResponseBody
    public User getUser() {
        return demoService.getUserInfo();
    }
}
